package levels
{
	import org.flixel.*;
	import utilities.Wave;
	
	import states.GameState;
	import enemies.*;
	import interactions.*;
	import items.*;
	import treasures.*;
	
	/**
	 * ...
	 * @author JAC
	 */
	public class Level_1 extends GameState
	{
		override public function create():void
		{
			super.create();
			
			_maze.load(MazeData.level_1);
			Player.spawnAt(14, 19);
			
			Tracker.lives = 0;
			Tracker.mapScore = 1000;
			Tracker.minScore = 2;
			Tracker.maxWave = 2;
			
			var robber_1:Robber = new Robber(8, 20);
			
			var robber_2:Robber = new Robber(20, 20);
			robber_2.setBaseSpeed(robber_1.speed - 7);
			
			var robber_3:Robber = new Robber(8, 20);
			
			var robber_4:Robber = new Robber(20, 20);
			robber_4.setBaseSpeed(robber_3.speed - 7);
			
			var wave:Wave = new Wave();
			wave.addEntity(robber_1);
			wave.addEntity(robber_2);
			
			addWave(wave, 2500);
			
			wave = new Wave();
			wave.addEntity(robber_3);
			wave.addEntity(robber_4);
			
			addWave(wave);
			
			addEntity(new LootBag(14, 6));
			addEntity(new LootBag(9, 9));
			addEntity(new LootBag(19, 9));
			
			gameStart();
		}
	}
}